package com.spsoft.workflow.common.enums.bus;

import com.spsoft.workflow.common.WorkFlowConstants;
import com.spsoft.workflow.common.enums.BusFlowTypeEnums;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 发票匹配流水流程枚举
 *
 * @author : chenxudong
 * @date : 2024/6/27 15:21
 */
@Getter
@AllArgsConstructor
public enum MatchFlowEnums {

    ROOT(WorkFlowConstants.ROOT_EVENT_ID, "提交"),
    FLOW_PPLS_SP(BusFlowTypeEnums.FLOW_PPLS + "_SP", "审批");

    private final String code;
    private final String name;

    public static MatchFlowEnums valueOfCode(String code) {
        for (MatchFlowEnums value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
